//
//  QryOnlineTicketResponse.m
//  EasyToo
//
//  Created by Jr Lan on 13-9-9.
//
//

#import "QryOnlineTicketResponse.h"
#import "MovieInfo.h"

@implementation QryOnlineTicketResponse

- (void)parse
{
    [super parse];
    
    if (self.bodyDict)
    {
        self.movieInfoArray = [[NSMutableArray alloc] init];
        
        NSArray *movieJsonArray = GetDictionaryArrayDefaultNil(self.bodyDict, @"films");
        for (int i = 0; i < [movieJsonArray count]; i++)
        {
            NSDictionary *movieInfoJson = [movieJsonArray objectAtIndex:i];
            MovieInfo *movieInfo = [[MovieInfo alloc] initWithDictionary:movieInfoJson];
            
            [self.movieInfoArray addObject:movieInfo];
            
            [movieInfo release];
        }
    }
}

@end
